<?php
/**
 * Created by PhpStorm.
 * User: lenove
 * Date: 2018/12/13
 * Time: 21:38
 */
include "../config.php";
if(isset($_REQUEST["uid"]) && isset($_REQUEST["gid"]) && isset($_REQUEST["size"])){
    $uid = $_REQUEST["uid"];
    $gid = $_REQUEST["gid"];
    $size = $_REQUEST["size"];
    $sql = "SELECT * FROM cart WHERE uid=? AND gid =? AND g_size=?;";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("iss", $uid,$gid,$size);
    $stmt->execute();
    $listArr = array();
    $result = $stmt->get_result();
    while($row = $result->fetch_assoc()){
        array_push($listArr, $row);
    }
    print_r(json_encode($listArr));
}
